﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.RenderInstancedDataLayout
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.Runtime.InteropServices;

#nullable disable
namespace UnityEngine
{
  internal readonly struct RenderInstancedDataLayout
  {
    public RenderInstancedDataLayout(System.Type t)
    {
      this.size = Marshal.SizeOf(t);
      IntPtr num1;
      int num2;
      if (t != typeof (Matrix4x4))
      {
        num1 = Marshal.OffsetOf(t, "objectToWorld");
        num2 = num1.ToInt32();
      }
      else
        num2 = 0;
      this.offsetObjectToWorld = num2;
      try
      {
        num1 = Marshal.OffsetOf(t, "prevObjectToWorld");
        this.offsetPrevObjectToWorld = num1.ToInt32();
      }
      catch (ArgumentException ex)
      {
        this.offsetPrevObjectToWorld = -1;
      }
      try
      {
        this.offsetRenderingLayerMask = Marshal.OffsetOf(t, "renderingLayerMask").ToInt32();
      }
      catch (ArgumentException ex)
      {
        this.offsetRenderingLayerMask = -1;
      }
    }

    public int size { get; }

    public int offsetObjectToWorld { get; }

    public int offsetPrevObjectToWorld { get; }

    public int offsetRenderingLayerMask { get; }
  }
}
